package com_.dxy_test_.testjackson;

import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;

/**
 * @Description TODO
 * @Author dangxianyue
 * @Date 2024/7/1 14:57
 */
public class TestJacksonMain {
    public static void main(String[] args) throws JsonProcessingException {
        final User user = new User(100, "小明");
        final ObjectMapper objectMapper = new ObjectMapper();
        final String json = objectMapper.writeValueAsString(user);
        System.out.println(json);
    }
}
